package org.battery.service;

import org.battery.entity.Page;
import org.battery.entity.Test;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * Created by 1t on 2017-08-16.
 */
@Service("testService")
public class TestService extends BaseService{

    public List<Test> getTest(Test test, Page page) throws Exception {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("info", test);
        map.put("page", page);
        return (List<Test>) this.getDaoSupport().findForList("T_Test.getTestPage", map);
    }

    public List<Test> getTestTime() throws Exception {
        return (List<Test>) this.getDaoSupport().findForList("T_Test.getTestTime");
    }

    public List<Test> getTestDay(Test test) throws Exception {
        return (List<Test>) this.getDaoSupport().findForList("T_Test.getTestDay", test);
    }

    public List<Test> getTestName(Test test) throws Exception {
        return (List<Test>) this.getDaoSupport().findForList("T_Test.getTestName", test);
    }

}
